package me.zk;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.function.Supplier;

/**
 * @Author: zhang kai
 * @Date: 2022/07/12
 * @Description:
 */
public class Car {
    private String color;
    private int weight;
    public Car(){}
    public Car(String color) {
        this.color = color;
    }
    public Car(String color, int weight) {
        this.color = color;
        this.weight = weight;
    }

    public static void main(String[] args) {
        Supplier<Car> s = Car::new;
        Car c1 = s.get();
        Function<String, Car> f = Car::new;
        Car c2 = f.apply("red");
        BiFunction<String, Integer, Car> biFunction = Car::new;
        Car c3 = biFunction.apply("red", 10);
    }

}
